<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Base extends Model
{
    public function setOrderAttribute($value)
    {
        $this->attributes['order'] = intval($value) ? intval($value) : 100;
    }

    protected $casts = [
        'status' => 'boolean'
    ];
//    public function getThumbImgAttribute($value)
//    {
//        if (strpos(url()->current(),'edit') === false) {
//            return asset('storage/'.$value);
//        }
//        return $value;
//    }
}
